feat: add LiveKit provider (Phase 1 - data channel)#3
feat: add LiveKit provider (Phase 1 - data channel)#3Mohith1612 wants to merge 3 commits intoArchishmanSengupta:mainfrom
Conversation
Implements LiveKitClient using LiveKit data messages for text-based adversarial evals without audio. Includes config integration, pipeline and researcher wiring, example config, env vars, and a fix for the run_conversation signature mismatch that caused TypeError when called from pipeline/researcher with scenario/dynamic_variables kwargs.
Add LiveKit to the supported providers list, setup instructions (env vars, config copy command), providers table, and project structure.
|
thanks @Mohith1612 for the contribution. i will take a look into the PR shortly. |
|
Thanks for the LiveKit update @Mohith1612 — I validated this PR against a real LiveKit Cloud deployment and wanted to share the results. What works
What is still broken (blocking end-to-end)
|
|
Hey @ArchishmanSengupta, thanks for the thorough review and the live deployment test, really helpful. Issue 1: research mode crash: fixed Added a Also added an Issue 2: no data-channel response: partially addressed Made the receiver more robust:
However after cross-referencing the latest LiveKit Python SDK docs, the client-side code is confirmed correct. The root cause of no response is almost certainly that the agent being tested doesn't implement a data channel listener at all. The protocol requires the agent to explicitly:
If the agent is audio-only (which is the default for most LiveKit agents built with |
What this adds
A new
livekitprovider that runs adversarial eval conversations over LiveKit data channel messages, no audio required. This lets you run the full autovoiceevals optimization loop against any agent deployed on a LiveKit room.How it works
The caller bot joins a uniquely-named LiveKit room and exchanges turns as JSON data messages on a configurable topic (default:
"text"):{"role": "user", "content": "<turn>"}{"role": "assistant", "content": "<reply>"}(plain text also accepted)Rooms are named
{room_prefix}-{scenario_id}-{uuid4}to prevent cross-talk between parallel evals.Files changed
autovoiceevals/livekit_provider.pyLiveKitClient(264 lines)autovoiceevals/config.pyLiveKitConfigdataclassautovoiceevals/pipeline.pylivekitin_build_provider()autovoiceevals/researcher.pylivekitin_build_provider()examples/livekit.config.yaml.env.examplerequirements.txtlivekit>=1.0.0)README.mdSetup
pip install "livekit>=1.0.0"Prompt management
agent_backend: "none"use the livekit provider for conversations only; manage prompts externally (raisesNotImplementedErroron prompt read/write)agent_backend: "smallest"delegatesget_system_prompt/update_prompttoSmallestClientWhy "Phase 1"?
This implements text-only evals. A future Phase 2 would support audio (microphone/speaker tracks). Phase 1 is already useful for any agent that processes text data messages, which covers the majority of LiveKit agent frameworks (e.g., LiveKit Agents SDK with a
DataChannelhandler).Bug fix included
Fixed a
TypeErrorinrun_conversationcaused by a signature mismatch when called frompipeline.py/researcher.pywithscenarioanddynamic_variableskwargs.